﻿@model VOD.Models.Video
@using VOD.Helpers
<!DOCTYPE html>
<html>
<head>
    <title>正在播放 - @Model.Name</title>
    <link href="@Url.Content("~/Content/jqueryui/ui.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/Common.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/Player.css")" rel="stylesheet" type="text/css" />
    @Content.Script("jquery.min.js", Url)
    @Content.Script("jquery-ui.min.js", Url)
    @Content.Script("jquery.validate.unobtrusive.min.js",Url)
    @Content.Script("jquery.unobtrusive-ajax.min.js", Url)
</head>
<body>
    <div class="pre_miniMenu">
        <div class="miniMenu">
            <div class="leftMenu">
                <a class="miniLogo" href="@Url.Content("~")"><img src="@Url.Content("~/Content/images/logo2.png")" height="30" /></a>
                <ul>
                    <li><a href="@Url.Content("~/")">首页</a></li>
                    <li><a href="@Url.Content("~/Movie")">电影</a></li>
                    <li><a href="@Url.Content("~/TV")">电视剧</a></li>
                    <li><a href="@Url.Content("~/Cartoon")">动漫</a></li>
                    <li><a href="@Url.Content("~/Variety")">综艺</a></li>
                    <li><a href="@Url.Content("~/Rank")">排行榜</a></li>
                </ul>
            </div>
            <div class="miniSearch">
                <input class="txtSearch" type="text" />
                <input class="btnSearch" type="button" value="搜索" />
            </div>
            <div class="miniUserInfo">
                <div id="loginBox">
                    @Html.Partial("~/Views/Account/_MiniLogOnPartial.cshtml")
                </div>
            </div>
        </div>
    </div>
    <div id="playMain">
        <div class="box">
            <div class="playBox">
                <!--播放代码-->
                <iframe id="iPlayBox" name="iPlayBox" src="@Url.Action("Player", "Video", new { id=Model.VideoID,orderNum=ViewBag.OrderNum??1})" width="100%" height="100%" frameborder="0" scrolling="no">
                </iframe>
            </div>
            @*<div class="videoInfo">
                <div class="title">
                    <h3>视频信息</h3>
                </div>
                <div class="info">
                    <dl>
                        <dt>
                            <a><img src="@Url.Content("~/Content/Images/VideoImg/"+Model.VideoID+".jpg")" onerror="javascript:this.src='@Url.Content("~/Content/images/nopic.jpg")'" height="128" width="96" /></a>
                        </dt>
                        <dd>
                            <h4>@(Model.Name??"未知")</h4>
                            <ul>
                                <li>导演：@(Model.Director??"未知")</li>
                                <li>演员：@(Model.Actor ?? "未知")</li>
                                <li>类别：
                                    @foreach(var type in Model.VideoAndTypes){
                                        @Html.ActionLink(type.VideoType.TypeName, "Type") @:&nbsp;
                                    }
                                </li>
                                <li>地区：@(Model.VideoArea.AreaName ?? "未知")</li>
                                <li>年份：@(Model.ShowYear ?? "未知")</li>
                            </ul>
                        </dd>
                    </dl>
                    <div class="intro">
                        <strong class="title">剧情简介</strong>
                        <p>@Html.Raw(HtmlCode.EnCode(Html.Truncate(Model.Intro, 200)))
                            <a href="#mDetails">[详细]</a>
                        </p>
                    </div>
                </div>
            </div>*@
            <div class="extMenu">
                @*<div class="menu">
                    <a class="btn_like" href="#">喜欢</a>
                    <a class="btn_favor" href="#">收藏</a>
                    <a class="btn_dl" href="#">下载</a>
                    <a class="btn_dlPlayer" href="@Url.Content("~/DownLoad/QvodSetupPlus4.3.37.exe")">下载播放器</a>
                    <a class="btn_err" href="#">报错</a>
                </div>*@
            </div>

            <div id="playListInfo">
                <span class="topBorder"></span>
                <div class="listInfo clearfix">
                    <div class="tvType" id="playlist_type1">
                        <div class="videoType">
                            <h3>分集</h3>
                        </div>
                        <div class="list">
                            <div id="showList" class="expand clearfix">
                                @{
                                    string title;
                                    foreach(var url in Model.VideoUrls){
                                        title="第"+url.VideoOrder+"集";
                                        @Html.ActionLink(title, "Player", "Video", new { id = Model.VideoID, orderNum = url.VideoOrder }, new { target = "iPlayBox" })
                                    }
                                }
                                
                            </div>
                            <script type="text/javascript">
                                $(function () {
                                    $("#showList a").bind("click", function (e) {
                                        $("#showList a").removeClass("now");
                                        $(e.target).addClass("now");
                                    });
                                });
                            </script>
                        </div>
                    </div>
                </div>
                <span class="bottomBorder"></span>
            </div>
        </div>
        <div class="playDataMain">
            <div class="comment">
                @*添加评论*@
                @{Html.RenderAction("Create","Comment",new {id=Model.VideoID});}

                <div id="Comments">
                    @{Html.RenderAction("Index","Comment",new {id=Model.VideoID});}
                </div>
            </div>
            <div class="oth">
                @*点播历史*@
                @{Html.RenderAction("ShowRecord","Video");}
                <div class="videoInfo">
                <div class="title">
                    <h3>视频信息<a id="mDetails"></a></h3>
                </div>
                <div class="info">
                    <dl>
                        <dt>
                            <a href="#"><img src="@Url.Content("~/Content/images/VideoImg/" + Model.VideoID + ".jpg")" onerror="javascript:this.src='@Url.Content("~/Content/images/nopic.jpg")'" height="128" width="96" /></a>
                        </dt>
                        <dd>
                            <h4>@(Model.Name ?? "未知")</h4>
                            <ul>
                                <li>导演：@(Model.Director ?? "未知")</li>
                                <li>演员：@(Model.Actor ?? "未知")</li>
                                <li>类别：
                                    @foreach (var type in Model.VideoAndTypes)
                                    {
                                        @Html.ActionLink(type.VideoType.TypeName, "Type") @:&nbsp;
                                    }
                                </li>
                                <li>地区：@(Model.VideoArea.AreaName ?? "未知")</li>
                                <li>年份：@(Model.ShowYear ?? "未知")</li>
                            </ul>
                        </dd>
                    </dl>
                    <div class="intro">
                        <strong class="title">剧情简介</strong>
                        <p id="Vintro">@Html.Raw(HtmlCode.EnCode(Html.Truncate(Model.Intro, 280)))
                            <a id="details" href="javascript:void(0);">[<span>展开</span>详细]</a>
                        </p>
                    </div>
                </div>
            </div>
            </div>
            <div id="AD_Play_bottom">
            <!--广告位-->
            </div>
        </div>
    </div>
    @{Html.RenderAction("Footer", "Others");}
    <script type="text/javascript">
        $(function () {
            $("#myHistory_btn_ce").bind("click", function () {
                if ($(this).attr("class") == "type_1") {
                    $("#myHistory_view").css("display", "none");
                    $(this).attr("class", "type_1 type_2");
                }
                else {
                    $("#myHistory_view").css("display", "block");
                    $(this).attr("class", "type_1");
                }
            });
            $("#details").toggle(function () {
                $("#Vintro").css("height", "auto");
                $(this).children("span").html("隐藏");
            }, function () {
                $("#Vintro").css("height", "180px");
                $(this).children("span").html("展开");
            });
        });
    </script>
</body>
</html>
